<template>
<div>
	<el-form :model="form" label-width="120px">
		<el-row>
			<el-col :span="8">
				<el-form-item label="微信费率类型:">
					<el-radio v-model="form.rscanWxFeeType" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanWxFeeType" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="微信费率:">
					<el-input v-model="form.rscanWxFeeRate" placeholder="为百分比时必填"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="微信费率金额:">
					<el-input v-model="form.rscanWxFeeNum" placeholder="百分比时为封底金额 0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="8">
				<el-form-item label="支付宝费率类型:">
					<el-radio v-model="form.rscanAliFeeType" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanAliFeeType" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="支付宝费率:">
					<el-input v-model="form.rscanAliFeeRate" placeholder="为百分比时必填"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="支付宝费率金额:">
					<el-input v-model="form.rscanAliFeeNum" placeholder="百分比时为封底金额 0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="6">
				<el-form-item label="银联借记卡一档费率类型:">
					<el-radio v-model="form.rscanDebitType1" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanDebitType1" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡一档金额:">
					<el-input v-model="form.rscanDebitNum1" placeholder="百分比：0.3 表示 0.003 固定金额0.5元，填写50"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡一档金额封底金额:">
					<el-input v-model="form.rscanDebitMin1" placeholder="单位：分;示例值:封底0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡一档金额封顶金额:">
					<el-input v-model="form.rscanDebitMax1" placeholder="单位：分;示例值:封顶9.99元，填写999"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="6">
				<el-form-item label="银联借记卡二档费率类型:">
					<el-radio v-model="form.rscanDebitType2" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanDebitType2" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡二档金额:">
					<el-input v-model="form.rscanDebitNum2" placeholder="示例 0.3表示0.003;固定金额:单位/分"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡二档金额封底金额:">
					<el-input v-model="form.rscanDebitMin2" placeholder="百分比时必填，示例值:封底0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="6">
				<el-form-item label="银联借记卡二档金额封顶金额:">
					<el-input v-model="form.rscanDebitMax2" placeholder="百分比时必填，示例值:封顶9.99元，填写999"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="8">
				<el-form-item label="银联贷记卡一档费率类型:">
					<el-radio v-model="form.rscanCreditType1" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanCreditType1" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="银联贷记卡一档金额:">
					<el-input v-model="form.rscanCreditNum1" placeholder="百分比;固定金额:单位/分"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="联贷记卡一档金额封底金额:">
					<el-input v-model="form.rscanCreditMin1" placeholder="百分比必填，示例值:封底0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="8">
				<el-form-item label="银联贷记卡二档费类型:">
					<el-radio v-model="form.rscanCreditType2" label="1">百分比</el-radio>
					<el-radio v-model="form.rscanCreditType2" label="2">固定金额</el-radio>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="银联贷记卡二档金额:">
					<el-input v-model="form.rscanCreditNum2" placeholder="百分比;固定金额:单位/分"></el-input>
				</el-form-item>
			</el-col>
			<el-col :span="8">
				<el-form-item label="银联贷记卡二档金额封底金额:">
					<el-input v-model="form.rscanCreditMin2" placeholder="百分比必填，示例值:封底0.01元，填写1"></el-input>
				</el-form-item>
			</el-col>
		</el-row>
		<el-form-item class="butt">
			<!-- <el-button type="primary" @click="onSubmit">提交</el-button> -->
			<el-button type="primary"  @click="onSubmit">提交</el-button>
		</el-form-item>

	</el-form>
</div>
</template>

<script>
	export default {
		props: {
			id: Number
		},
		data() {
			return {
				form:{
					'rscanWxFeeType':'1',
					'rscanWxFeeRate':'',
					'rscanWxFeeNum':'',
					'rscanAliFeeType':'1',                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
					'rscanAliFeeRate':'',
					'rscanAliFeeNum':'',
					'rscanDebitType1':'1',
					'rscanDebitNum1':'',
					'rscanDebitMin1':'',
					'rscanDebitMax1':'',
					'rscanDebitType2':'1',
					'rscanDebitNum2':'',
					'rscanDebitMin2':'',
					'rscanDebitMax2':'',
					'rscanCreditType1':'1',
					'rscanCreditNum1':'',
					'rscanCreditMin1':'',
					'rscanCreditType2':'1',
					'rscanCreditNum2':'',
					'rscanCreditMin2':'',
				},
			}
		},
		created() {
		},
		methods: {
			onSubmit(){
				let that = this;
				this.$axios({
					url:'/admin/channel/other',
					data:{
						userID: this.id,
						type: 5,
						genre: 4,
						form:this.form
					},
					success(res){
						if(res.data.code == '200'){
							that.$message.success(res.data.msg)
						}else{
							that.$message.error(res.data.msg)
						}
					}
				});
			}
		}
	}
</script>

<style>
	
	.butt {
		text-align: center;
		/* margin-top: 10px; */
		margin: 40px;
	}
</style>
